//这个模块主要获取的是报名考试的数据的模块
import request from '@/utils/request'

/**
 * 老师发布的考试
 * 主要为了发布者可以对考试修改
 *
 * @param request 啊哈
 * @return 1  未开始
 * 2  已开始
 * 3  已结束
 */

// /exam/exam

// 查询所有状态的考试
// pageAllStatusExam
// @RequestBody Exam exam, long current, long limit, int status
export const reqGetExamInfoByState = (exam, current, limit, status)=>{
    return request({
        url: '/exam/exam/pageAllStatusExam',
        method: 'post',
        data: exam,
        params:{current,limit,status},
    });
}

// 考生报名考试
// registerForExam
// HttpServletRequest request, String examId
export const registerForExam = (examId) => request({
    url: '/exam/exam/registerForExam',
    method: 'post',
    params:{examId},
});

